﻿<%@ Page Language="VB" MasterPageFile="~/promocionVenta.master" AutoEventWireup="false"
CodeFile="notaria.aspx.vb" Inherits="mantenedores_notaria" Title=" .:: EVOLTA | Promoción ::. " %>

<%@ MasterType VirtualPath="~/promocionVenta.master" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%@ Register Assembly="Flan.Controls" Namespace="Flan.Controls" TagPrefix="flan" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<style type="text/css">
#txtBuscar
{
width: 299px;
}
.filaEncabezadoPrincipal
{
background-image: url('../imagenes/px_td.jpg');
width: 100%;
background-repeat: repeat;
}
.filaEncabezadoTitulo
{
background-image: url('../imagenes/submenu3.PNG');
background-repeat: repeat;
}
.filaEncabezado
{
background-image: url('../imagenes/submenu3.PNG');
width: 100%;
background-repeat: repeat;
}
.colGrilla
{
background-image: url('../imagenes/submenu2.PNG');
height: 20px;
background-repeat: repeat;
}
</style>

<script src="../javascript/Evoltat.js" type="text/javascript"></script>

<script language="javascript" type="text/javascript">
function ConfirmaEliminacion(sender) {
return confirm('¿Está seguro que desea eliminar la Notaria?\n' + sender.alt);
}
function MuestraPanel() {
limpiarControles();
$find(mpeDetalle).show();
return true;
}
function limpiarControles() {
document.getElementById('ctl00$ContentPlaceHolder1$txtNotaria').value = '';
document.getElementById('ctl00$ContentPlaceHolder1$txtContacto').value = '';
document.getElementById('ctl00$ContentPlaceHolder1$txtapePaterno').value = '';
document.getElementById('ctl00$ContentPlaceHolder1$txtapeMaterno').value = '';
document.getElementById('ctl00$ContentPlaceHolder1$txtTelefonoFijo').value = '';
document.getElementById('ctl00$ContentPlaceHolder1$selEstado').selectedIndex = 1;
document.getElementById('ctl00$ContentPlaceHolder1$selEstado').disabled = 'disabled';
}
function validar() {
if (document.getElementById('ctl00$ContentPlaceHolder1$txtNotaria').value == '') {
alert('Debe ingresar el nombre de la Notaría');
document.getElementById('ctl00$ContentPlaceHolder1$txtNotaria').focus();
return (false);
}
if (document.getElementById('ctl00$ContentPlaceHolder1$txtContacto').value == '') {
alert('Debe ingresar el nombre del Contacto');
document.getElementById('ctl00$ContentPlaceHolder1$txtContacto').focus();
return (false);
}
if (document.getElementById('ctl00$ContentPlaceHolder1$txtapePaterno').value == '') {
alert('Debe ingresar el apellido paterno del contacto');
document.getElementById('ctl00$ContentPlaceHolder1$txtapePaterno').focus();
return (false);
}
if (document.getElementById('ctl00$ContentPlaceHolder1$txtapeMaterno').value == '') {
alert('Debe ingresar el apellido materno del contacto');
document.getElementById('ctl00$ContentPlaceHolder1$txtapeMaterno').focus();
return (false);
}
}
</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<table style="width: 100%; background-color: #f4f4f4;" cellspacing="0">
<tr class="filaEncabezadoPrincipal">
<td>
<table width="100%">
<tr>
<td>
<asp:Label ID="Label1" runat="server" CssClass="CeldaTituloTexto" Text="Mantenedor de Notarias"
></asp:Label>
</td>
</tr>
</table>
</td>
</tr>
</table>
<asp:Panel ID="pnlNotarias" runat="server" Width="100%">
<table style="width: 100%; background-color: #f4f4f4" class="EditarLabel" cellspacing="0" border="1" cellpadding="0">
<tbody>
<tr>
<td style="width: 100%; padding-top: 5px; padding-bottom: 3px">
</td>
</tr>
<tr>
<td style="width: 100%; padding-top: 5px; padding-bottom: 3px">
<asp:Label ID="Label3" runat="server" CssClass="CeldaTituloTexto" Text="Buscar: "
SkinID="lblNormal"></asp:Label>
<input id="txtBuscar" runat="server" class="CsstxtFiltro" type="text" autocomplete="off" /><asp:Button
ID="btnBuscar" runat="server" Text="Buscar" CausesValidation="False" SkinID="btnNormalSkin"
UseSubmitBehavior="False" />
<asp:Button ID="btnAgregar" runat="server" Text="Agregar" CausesValidation="False"
SkinID="btnNormalSkin" UseSubmitBehavior="False" />
<asp:Button ID="btnExcel" runat="server" CausesValidation="False"
SkinID="btnNormalSkin" Text="Excel" UseSubmitBehavior="False" />
</tr>
<tr>
<td>
<div style="width: 100%; height: 20px; scrollbar-face-color: #B5B5B5;" class="DivPanelGrillaEncabezado">
<table cellpadding="0" cellspacing="1" width="100%">
<tr align="center">
<td align="center" valign="middle" width="10%" class="colGrilla">
<asp:LinkButton ID="lnkBtnCodigo" runat="server" SkinID="lnkBtnEncabezado" CommandArgument="idNotaria"
CommandName="idNotaria" Height="100%">Código</asp:LinkButton>
</td>
<td align="center" valign="middle" width="15%" class="colGrilla">
<asp:LinkButton ID="lnkBtnNotaria" runat="server" SkinID="lnkBtnEncabezado" CommandArgument="desNotaria"
CommandName="desNotaria" Height="100%">Nombre de Notaría</asp:LinkButton>
</td>
<td align="center" valign="middle" width="30%" class="colGrilla" >
<asp:LinkButton ID="lnkBtnNombre" runat="server" CommandArgument="NombresCompletos"
CommandName="NombresCompletos" SkinID="lnkBtnEncabezado">Nombre de Contacto</asp:LinkButton>
</td>
<td align="center" valign="middle" width="15%" class="colGrilla">
<asp:LinkButton ID="lnkBtnTelefono" runat="server" CommandArgument="telefono" CommandName="telefono"
SkinID="lnkBtnEncabezado">Telefono</asp:LinkButton>
</td>
<td align="center" valign="middle" width="19%" class="colGrilla">
<asp:LinkButton ID="lnkBtnEstado" runat="server" SkinID="lnkBtnEncabezado" CommandArgument="desEstado"
CommandName="desEstado">Estado</asp:LinkButton>
</td>
<td align="center" valign="middle" width="11%" class="colGrilla">
<asp:Label ID="lblEliminar" runat="server" Text="Eliminar" SkinID="lblEncabezado"></asp:Label>
</td>
</tr>
</table>
</div>
<div style="overflow-y: scroll; overflow-x: hidden; width: 100%; height: 470px; scrollbar-face-color: #B5B5B5;"
class="DivPanelGrillaCuerpo">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="gvwLista" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="0" ForeColor="Black"
GridLines="Vertical" Width="99%" Font-Names="Tahoma" DataKeyNames="idNotaria"
SkinID="gvwListaSkin" ShowHeader="False" EnableSortingAndPagingCallbacks="True">
<Columns>
<asp:TemplateField HeaderText="Código">
<ItemTemplate>
<asp:LinkButton ID="lnkCodigo" runat="server" CausesValidation="False" CommandName="Edit"
ForeColor="Black" Height="20px" Style="display: block; text-decoration: none;"
Text='<%# Eval("idNotaria","{0:00000}") %>' CommandArgument='<%# Eval("idNotaria") %>'></asp:LinkButton>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="10%" Height="20px" />
<ItemStyle HorizontalAlign="Center" Width="10%" Height="20px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Nombre de Notaría">
<ItemTemplate>
<asp:LinkButton ID="lnkDescripción" runat="server" CausesValidation="False" CommandName="Edit"
ForeColor="Black" Height="20px" Style="display: block; text-decoration: none;"
Text='<%# Eval("descNotaria") %>' CommandArgument='<%# Eval("idNotaria") %>'></asp:LinkButton>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="15%" Height="20px" />
<ItemStyle HorizontalAlign="Left" Width="15%" Height="20px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Nombre de Contacto">
<ItemTemplate>
<asp:LinkButton ID="lnkContacto" runat="server" CausesValidation="False" CommandName="Edit"
ForeColor="Black" Height="20px" Style="display: block; text-decoration: none;"
Text='<%# Eval("NombresCompletos") %>' CommandArgument='<%# Eval("idNotaria") %>'></asp:LinkButton>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="30%" Height="20px" />
<ItemStyle HorizontalAlign="Left" Width="30%" Height="20px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Teléfono">
<ItemTemplate>
<asp:LinkButton ID="lnkTelefonos" runat="server" CausesValidation="False" CommandName="Edit"
ForeColor="Black" Height="20px" Style="display: block; text-decoration: none;"
Text='<%# Eval("telefono") %>' CommandArgument='<%# Eval("idNotaria") %>'></asp:LinkButton>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="15%" Height="20px" />
<ItemStyle HorizontalAlign="Center" Width="15%" Height="20px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Estado">
<ItemTemplate>
<asp:LinkButton ID="lnkEstado" runat="server" CausesValidation="False" CommandName="Edit"
ForeColor="Black" Height="20px" Style="display: block; text-decoration: none;"
Text='<%# Eval("desEstado") %>' CommandArgument='<%# Eval("idNotaria") %>'></asp:LinkButton>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="19%" Height="20px" />
<ItemStyle HorizontalAlign="Center" Width="19%" Height="20px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="lnkEliminar" runat="server" CausesValidation="False"
ForeColor="Black" Height="20px" Style="display: block; text-decoration: none;"
CommandArgument='<%# Eval("idNotaria") %>' ToolTip="Eliminar Notaria" >
<asp:ImageButton ID="btnEliminar" runat="server" CommandName="Delete" ImageUrl="~/Imagenes/Procesos/borrar.png"
OnClientClick="return ConfirmaEliminacion(this);" Style="cursor: pointer"
ToolTip="Eliminar Notaria" CommandArgument='<%# Eval("idNotaria") %>' /></asp:LinkButton>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="10%" Height="20px" />
<ItemStyle HorizontalAlign="Center" Width="10%" Height="20px" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</td>
</tr>
</tbody>
</table>
</asp:Panel>
<ajax:ModalPopupExtender ID="mpeDetalle" runat="server" TargetControlID="btnAgregar"
BackgroundCssClass="modalBackground"
DropShadow="True" PopupControlID="pnlIngresar"
PopupDragHandleControlID="lblTitulo">
</ajax:ModalPopupExtender>
<asp:Panel ID="pnlIngresar" runat="server" CssClass="modalPopup" Width="350px" Height="220px" Style="display: none;">
<table cellpadding="0" cellspacing="0" class="style1" align="right" width="100%">
<tr>
<td class="style2" colspan="3" bgcolor="#E44146">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Label ID="lblTitulo" runat="server" SkinID="lblFormulario"
Text="Notaría [Registrar]" ToolTip="Registrar"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td class="style2" align="right" valign="middle">
&nbsp;
</td>
<td rowspan="13">
&nbsp;
</td>
<td>
&nbsp;
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel12" runat="server">
<ContentTemplate>
<asp:TextBox ID="txtId" runat="server" Style="display: none;"></asp:TextBox></ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td align="right" class="style2" valign="middle">
&nbsp;
<asp:Label ID="Label5" runat="server" Text="Nombre de Notaría"
SkinID="lblNormal"></asp:Label>
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<ContentTemplate>
<input id="txtNotaria" runat="server" autocomplete="off"
class="CsstxtNormalObligatorio" onkeypress="return validarSoloLetras(event);"
type="text" maxlength="22" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td class="style2" align="right">
&nbsp;
<asp:Label ID="Label9" runat="server" Text="Nombre Contacto" SkinID="lblNormal"></asp:Label>
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel7" runat="server">
<ContentTemplate>
<input id="txtContacto" runat="server" autocomplete="off"
class="CsstxtNormalObligatorio" onkeypress="return validarSoloLetras(event);"
type="text" maxlength="22" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td align="right" class="style2">
<asp:Label ID="Label14" runat="server" Text="Apellido Paterno Contacto:"
SkinID="lblNormal"></asp:Label>
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel15" runat="server">
<ContentTemplate>
<input ID="txtapePaterno" runat="server" autocomplete="off"
class="CsstxtNormalObligatorio" onkeypress="return validarSoloLetras(event);"
type="text" maxlength="22" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td align="right" class="style2">
<asp:Label ID="Label15" runat="server" Text="Apellido Materno Contacto:"
SkinID="lblNormal"></asp:Label>
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel14" runat="server">
<ContentTemplate>
<input ID="txtapeMaterno" runat="server" autocomplete="off"
class="CsstxtNormalObligatorio" onkeypress="return validarSoloLetras(event);"
type="text" maxlength="22" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td class="style2" align="right">
&nbsp;
<asp:Label ID="Label10" runat="server" Text="Teléfono: " SkinID="lblNormal"></asp:Label>
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel8" runat="server">
<ContentTemplate>
<input id="txtTelefonoFijo" runat="server" autocomplete="off" class="CsstxtNormal"
type="text" onkeypress="return VerificarTelefono(event);" maxlength="10" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td align="right" class="style2">
<asp:Label ID="Label13" runat="server" Text="Estado: " SkinID="lblNormal"></asp:Label>
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel11" runat="server">
<ContentTemplate>
<select id="selEstado" runat="server" class="CssddlNormal" name="selEstado">
<option></option>
</select>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td class="style2" align="right" valign="middle">
&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
<tr>
<td align="right" class="style2" valign="middle">
&nbsp;
<asp:Button ID="btnGuardar" runat="server" CausesValidation="False" SkinID="btnNormalSkin"
Text="Guardar" OnClientClick="return validar();" />
</td>
<td>
<asp:Button ID="btnCancelar" runat="server" CausesValidation="False" SkinID="btnNormalSkin"
Text="Cancelar" />
</td>
</tr>
<tr>
<td class="style2">
&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
</table>
</asp:Panel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div id="divProgress" class="divProgreso">
<img src="../imagenes/ajax-loader.gif" align="middle" alt="Procesando" />
<asp:Label ID="lblprogreso" runat="server" Text=" Procesando..." CssClass="EditarLabel"></asp:Label>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<flan:UpdateProgressOverlayExtender ID="UpdateProgressOverlayExtender1"
runat="server"
CssClass="updateProgress"
OverlayType="Browser"
TargetControlID="UpdateProgress1" />
</asp:Content>